package cn.face.sdk;



public class FaceDetTrack {

	static FaceDetTrack sCJNI = null;
	
	public FaceDetTrack() {
		loadLibrarys();
	}

	public static FaceDetTrack getInstance() {

		if (null == sCJNI) {
			sCJNI = new FaceDetTrack();

		}
		return sCJNI;
	}

	private static void loadLibrary(String libraryName) {
		System.loadLibrary(libraryName);
	}

	private static void loadLibrarys() {
	/*	loadLibrary("CWFaceDetTrack");
		loadLibrary("CwRecog");
		loadLibrary("CWFaceSDK");
		loadLibrary("CWFaceSDKJni");*/
	}


	static public native int cwCreateDetHandle(String pConfigFile, String pLicence);

	static public native int cwReleaseDetHandle(int pDetector);

	static public native int cwGetFaceParam(int pDetector, FaceParam param);
	static public native int cwSetFaceParam(int pDetector, FaceParam param, String pConfigFile);
	static public native int cwSetFaceBufOrder(int pDetector, int flag);

	static public native int cwFaceDetection(int pDetector, byte[] pFrameImg, 
											 int iWidth, 
											 int iHeight, 
											 int iFormat, 
											 int iAngle, 
											 int iMirror,
											 int iOp,
											 FaceInfo[] pFaceBuffer);

}
